#ifndef __BASIC_LAYER_H__
#define __BASIC_LAYER_H__

#include "hjcCommon.h"
#include "cocos2d.h"
USING_NS_CC;

#define DECLARE_CREATE_MENU(name, xPercent, yPercent, z) \
	virtual void create##name##Menu(); \
	virtual void set##name##MenuPosition(CCNode* pNode) { ui::placeUI(pNode, xPercent, yPercent); } \
	virtual void afterCreate##name##Menu(CCNode* pNode) { addChild(pNode, z); } \
	virtual void cb##name##Menu(); \
	std::string m_str##name##MenuPng1; \
	std::string m_str##name##MenuPng2

#define DECLARE_CREATE_SPRITE(name, xPercent, yPercent, z) \
	virtual void create##name##Sprite(); \
	virtual void set##name##SpritePosition(CCNode* pNode) { ui::placeUI(pNode, 0.5f, 0.5f); } \
	virtual void afterCreate##name##Sprite(CCNode* pNode) { addChild(pNode, 0); } \
	std::string m_str##name##Png

class BasicLayer : public CCLayer
{
public:
	BasicLayer() {}
	virtual ~BasicLayer();

	virtual void init();

	/*
	* background sprite
	*/
	DECLARE_CREATE_SPRITE(Background, 0.5f, 0.5f, 0);

	/*
	* background music
	*/
	std::string m_strBackgroundMusic;
};

#endif // __BASIC_LAYER_H__